﻿using System;
using System.Runtime.Serialization;

namespace SimpleInfrastructure.Exceptions
{
    [Serializable]
    public class AlertException:CustomException
    {
        public AlertException(string message) : base(message)
        {
            
        }

        public AlertException(string message,Exception innerException) : base(message,innerException)
        {
            
        }

        public AlertException(SerializationInfo info, StreamingContext context):base(info,context)
        {

        }

        private string alertMessage;
        public virtual string AlertMessage
        {
            set
            {
                alertMessage = value;
            }
            get
            {
                return string.IsNullOrEmpty(alertMessage)?Message:alertMessage;
            }
        }
    }
}
